package com.qmo.edu.moudle.fragment;

import android.content.Intent;
import android.widget.ImageView;
import android.widget.TextView;

import com.qmo.edu.R;
import com.qmo.edu.base.BaseMvpFragment;
import com.qmo.edu.moudle.activity.LoginActivity;
import com.qmo.edu.moudle.bean.LoginOut;
import com.qmo.edu.moudle.bean.UserInfoBean;
import com.qmo.edu.mvp.factroy.CreatePresenterAnnotation;
import com.qmo.edu.mvp.presenter.FivePresenter;
import com.qmo.edu.mvp.presenter.ThreePresenter;
import com.qmo.edu.mvp.view.FiveView;
import com.qmo.edu.mvp.view.ThreeView;
import com.qmo.edu.utils.SPUtils;
import com.qmo.edu.utils.ToastUtils;

import butterknife.BindView;

/**
 * Created by ${安文静} on 2019/6/10.
 *
 * @author cyx
 */
@CreatePresenterAnnotation(FivePresenter.class)
public class FiveFragment extends BaseMvpFragment<FiveView, FivePresenter> implements FiveView {


    @BindView(R.id.iv_title_return)
    TextView mIvTitleReturn;
    @BindView(R.id.tv_title_text)
    TextView mTvTitleText;
    @BindView(R.id.iv_search)
    TextView mIvSearch;
    @BindView(R.id.tv_message)
    TextView mTvMessage;
    @BindView(R.id.tv_save)
    TextView mTvSave;
    @BindView(R.id.iv_red)
    ImageView mIvRed;


    @Override
    public int getFragmentLayout() {
        return R.layout.fragment_five;
    }

    @Override
    protected void initView() {
        mTvTitleText.setText("我的");

    }

    @Override
    protected void initData() {

    }


    @Override
    public void onDestroyView() {
        super.onDestroyView();


    }


    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

    }

//    @Override
//    public void logOut(LoginOut bean) {
//        SPUtils.put(getActivity(), "isLogin", false);
//        ToastUtils.showShortToast("退出登录，请重新登录");
//        Intent intent = new Intent(getActivity(), LoginActivity.class);
//        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
//        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//        startActivity(intent);
//        getActivity().finish();
//    }
//
//    @Override
//    public void getUserInfo(UserInfoBean bean) {
//
//    }


    @Override
    public void onHiddenChanged(boolean hidden) {
        super.onHiddenChanged(hidden);
//        if (hidden == true) {
//
//            getMvpPresenter().userInfo("Bearer  " + SPUtils.get(getActivity(), "token", ""), (String) SPUtils.get(getActivity(),"userId",""));
//
//        }

    }

    @Override
    public void onResume() {
        super.onResume();
    }


}
